package com.lnking.lnkingplace.service.impl;


import com.lnking.lnkingplace.mapper.PointPositionMapper;
import com.lnking.lnkingplace.model.entity.PointPosition;
import com.lnking.lnkingplace.model.request.Position.PositionAddRequest;
import com.lnking.lnkingplace.service.IPointPositionService;
import com.lnking.starter.mybatis.service.impl.CustomServiceImpl;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhangqt
 * @since 2022-11-26
 */
@Service
public class PointPositionServiceImpl extends CustomServiceImpl<PointPositionMapper, PointPosition> implements IPointPositionService {

    @Override
    public void add(PositionAddRequest params) {
        PointPosition pointPosition = new PointPosition();
        BeanUtils.copyProperties(params,pointPosition);
        pointPosition.setCreateTime(LocalDateTime.now());
        save(pointPosition);
    }
}
